#include <iostream>
#include <string>

using namespace std;
int main(void)
{
    char ch[100] = {0};
    int i = 0;
    int sum = 0;
    int t=16;
    while(t--)
    {
        cin>>ch[i];
        if (ch[i] == '-'||t==0)
        {
            i++;
            continue;
        }
        if ((ch[i] - '0') % 2 == 0)
        {
            sum = sum + 3*(ch[i] - '0');
        }
        else
        {
            sum = sum + (ch[i] - '0');
        }
        i++;
    }
    int yushu = sum / 10;
    int X = 10 - yushu;
    if(X<0)
    {
        X=-X;
    }
    if(X==10)
    {
        X=0;
    }
    if (ch[16] == '0'+X)
        cout<<"Right"<<endl;
    else
    {
        ch[16] = '0'+X;
        cout<<ch<<endl;
    }

    return 0;
}